// 生命周期



fn longest<'a>(s1: &'a str, s2: &'a str) -> &'a str {
    if s1.len() > s2.len() {
        s1
    } else {
        s2
    }
}


#[test]
fn test_lifetime() {
    let s1 = String::from("11111111111");


    let s2 = String::from("333");


    let max = longest(&s1, &s2);

    println!("max is {}", max);
}





// 生命周期的




